requirejs.config({
	baseUrl: "js/lib",
	paths: {
		app: "../app"
	}
});

requirejs(["avalon","oniui/mmRouter/mmState", "app/main"], function() {
	avalon.require = requirejs
    // 重写模板加载器，改为用text插件加载
    avalon.state.templateLoader = function(url, resolve, reject, reason) {
        avalon.require(["text!" + url], function(tpl) {
            resolve(avalon.templateCache[url] = tpl)
        })
    }
});
